package com.zhongkai.model3;

import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;


/**
 * 产品表
 * */
@Entity
@Table(name = "set_product",    catalog = "")
public class SetProduct implements Serializable {
    private Integer id;
    private String setUuid;
    private String proName;
    private String proUnit;
    private String proCost;
    private String proRemove;


    @Basic
    @Column(name = "pro_remove")
    public String getProRemove() {
        return proRemove;
    }

    public void setProRemove(String proRemove) {
        this.proRemove = proRemove;
    }

    @Id
    @GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
    @Column(name = "id")
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "set_uuid")
    public String getSetUuid() {
        return setUuid;
    }

    public void setSetUuid(String setUuid) {
        this.setUuid = setUuid;
    }

    @Basic
    @Column(name = "pro_name")
    public String getProName() {
        return proName;
    }

    public void setProName(String proName) {
        this.proName = proName;
    }

    @Basic
    @Column(name = "pro_unit")
    public String getProUnit() {
        return proUnit;
    }

    public void setProUnit(String proUnit) {
        this.proUnit = proUnit;
    }

    @Basic
    @Column(name = "pro_cost")
    public String getProCost() {
        return proCost;
    }

    public void setProCost(String proCost) {
        this.proCost = proCost;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SetProduct that = (SetProduct) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(setUuid, that.setUuid) &&
                Objects.equals(proName, that.proName) &&
                Objects.equals(proUnit, that.proUnit) &&
                Objects.equals(proCost, that.proCost);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, setUuid, proName, proUnit, proCost);
    }
}
